PICTools Programmer's Reference
PIC2List TIFF / EXIF Packet Functions

The P2PktTiffTag structure is defined as: 

 
Copy Code
typedef struct {
   BYTE     Type;
   DWORD    Length;
   BYTE     Location;
   WORD     TiffTag;
   WORD     TiffType;
   DWORD    TiffCount;
   BYTE     TiffData[1];
} P2PktTiffTag;
The PIC2List TIFF / EXIF Packet Functions are as follows:

P2LAddTiffTag

 
Copy Code

P2PktTiffTag* P2LAddTiffTag(

    P2LIST*     p2l,

    BYTE        loc,

    WORD        tag,

    WORD        type,

    DWORD       count,

    const BYTE* data);

P2LAddTiffTag adds an Exif tag packet of the specified characteristics, enlarging the PIC2List if necessary.  loc specifies the IFD within which the Exif tag packet should be placed. If data is a null pointer, then the TiffData field in the Exif tag packet is unitialized.  P2LAddTiffTag returns 0 if an Exif tag packet with the same tag and the same IFD is already present in the PIC2List (see P2LModifyTiffTag and P2LAddOrModifyTiffTag).  P2LAddTiffTag returns 0 if a memory allocation error occurs attempting to enlarge the PIC2List.

P2LModifyTiffTag

 
Copy Code

P2PktTiffTag* P2LModifyTiffTag(

    P2LIST*     p2l,

    BYTE        loc,

    WORD        tag,

    WORD        type,

    DWORD       count,

    const BYTE* data);

P2LModifyTiffTag modifies the Exif tag packet in the loc IFD with the specified type, enlarging the PIC2List if necessary. If data is 0, then the TiffData field in the Exif tag packet is unitialized.  P2LModifyTiffTag returns 0 if no Exif tag packet with the same tag and the same IFD is already present (see P2LAddTiffTag and P2LAddOrModifyTiffTag).  P2LModifyTiffTag returns 0 if a memory allocation error occurs attempting to enlarge the PIC2List.

P2LAddOrModifyTiffTag

 
Copy Code

P2PktTiffTag* P2LAddOrModifyTiffTag(

    P2LIST*     p2l,

    BYTE        loc,

    WORD        tag,

    WORD        type,

    DWORD       count,

    const BYTE* data);

P2LAddOrModifyTiffTag adds an Exif tag packet of the specified characteristics, enlarging the PIC2List if necessary.  loc specifies the IFD within which the Exif tag packet should be placed. If data is a null pointer, then the TiffData field in the Exif tag packet is unitialized.  If an Exif tag packet with the same tag and the same IFD is already present in the PIC2List, it is modified, otherwise a tag is added to the PIC2List. P2LAddOrModifyTiffTag returns 0 if a memory allocation error occurs attempting to enlarge the PIC2List.

P2LDeleteTiffTag

 
Copy Code

BOOL P2LDeleteTiffTag(P2LIST* p2l, P2PktTiffTag* pkt);

P2LDeleteTiffTag is called to delete an Exif tag packet from the PIC2List.  pkt must point to the Type field of an Exif tag packet within the PIC2List.  No validation is performed.

P2LFirstTiffTag

 
Copy Code

P2PktTiffTag* P2LFirstTiffTag(const P2LIST* p2l, BYTE loc);

P2LFirstTiffTag returns a pointer to the first Exif tag packet of any type in the loc IFD. P2LFirstTiffTag returns 0 if there are no tiff tag packets in the loc IFD.

P2LNextTiffTag

 
Copy Code

P2PktTiffTag* P2LNextTiffTag(const P2LIST* p2l, const P2PktTiffTag* pkt);

P2LNextTiffTag returns a pointer to the first Exif tag packet following pkt in the same IFD as pkt.  pkt must point into the PIC2List to the Type field of an Exif tag packet.  No validation is performed.  If 0 is returned, then there is no Exif tag packet following the packet in the same IFD.

P2LFindTiffTag

 
Copy Code

P2PktTiffTag* P2LFindTiffTag(const P2LIST* p2l, BYTE loc, WORD tag);

P2LFindTiffTag finds the first Exif tag packet in the loc IFD with a matching tag. P2LFindTiffTag returns 0 if there is no matching Exif tag packet in the IFD.

P2LFindNextTiffTag

 
Copy Code

P2PktTiffTag* P2LFindNextTiffTag(const P2LIST* p2l, const P2PktTiffTag* pkt);

P2LFindNextTiffTag returns a pointer to the Exif tag packet following pkt in the same IFD.  Pkt must point into the PIC2List to the Type field of an Exif tag packet.  No validation is performed.  P2LFindTiffTag returns 0 if there are no Exif tag packets following pkt in the same IFD.

P2LTiffNthData

 
Copy Code

DWORD P2LTiffNthData(const P2PktTiffTag* pkt, DWORD n);

P2LTiffNthData retrieves the Nth data item in an Exif tag.  The BYTE, SHORT, LONG, SBYTE, SSHORT or SLONG data item is returned as a DWORD,

P2LTiffCount

 
Copy Code

DWORD P2LTiffCount(P2PktTiffTag* pkt);

P2LtiffCount return the count of data items in an Exif tag.

P2LTiffType

 
Copy Code

WORD P2LTiffType(P2PktTiffTag* pkt);

P2LTiffType returns the data type for an Exif tag.

P2LTiffTag

 
Copy Code

WORD P2LTiffTag(P2PktTiffTag* pkt);

P2LTiffTag returns the tag for an Exif tag.

P2LTiffLocation

 
Copy Code

BYTE P2LTiffLocation(P2PktTiffTag* pkt);

P2LTiffLocation returns the IFD location for the Exif tag.

P2LTiffData

 
Copy Code

DWORD P2LTiffData(P2PktTiffTag* pkt);

P2LTiffData returns the first data item in an Exif tag. The BYTE, SHORT, LONG, SBYTE, SSHORT or SLONG data item is returned as a DWORD,

P2LTiffByte

 
Copy Code

BYTE P2LTiffByte(P2PktTiffTag* pkt);

P2LTiffByte returns the BYTE data in an Exif tag.

P2LTiffShort

 
Copy Code

BYTE P2LTiffShort(P2PktTiffTag* pkt);

P2LTiffShort returns the WORD data in an Exif tag.

P2LTiffLong

 
Copy Code

BYTE P2LTiffLong(P2PktTiffTag* pkt);

P2LTiffLong returns the DWORD data in an Exif tag.

P2LTiffRationalNumerator

 
Copy Code

BYTE P2LTiffRationalNumerator(P2PktTiffTag* pkt);

P2LTiffRationalNumerator returns the numerator for an Exif tag rational data type as a DWORD.

P2LTiffRationalDenominator

 
Copy Code

BYTE P2LTiffRationalDenominator(P2PktTiffTag* pkt);

P2LTiffRationalDenominator returns the denominator for an Exif tag rational data type as a DWORD.

P2LTiffAscii

 
Copy Code

LPCSTR P2LTiffAscii(P2PktTiffTag* pkt);

P2LTiffAscii returns a pointer to the ASCIIZ data in an Exif tag whose data type is ASCII.

P2LTiffUndefined

 
Copy Code

BYTE* P2LTiffUndefined (P2PktTiffTag* pkt);

P2LTiffUndefined returns a pointer to the BYTE array data in an Exif tag whose data type is UNDEFINED.

 

 


©2022. Accusoft Corporation. All Rights Reserved.

Send Feedback